import 'package:flutter_shop/pages/cart/cart_tab_page/provider/cart_provider.dart';
import 'package:flutter_shop/pages/category/category_tab_page/provider/left_menu_provider.dart';
import 'package:flutter_shop/pages/category/category_tab_page/provider/sub_category_goods_page_provider.dart';
import 'package:flutter_shop/pages/category/category_tab_page/provider/sub_category_provider.dart';
import 'package:flutter_shop/pages/common/index_page/provider/index_page_provider.dart';
import 'package:flutter_shop/pages/common/login/provider/login_provider.dart';
import 'package:provider/provider.dart';
import 'package:provider/single_child_widget.dart';

List<SingleChildWidget> providers = List()..addAll(common)..addAll(category)..addAll(cart);

///常规模块
List<SingleChildWidget> common = [
  ChangeNotifierProvider(create: (_) => IndexPageProvider()), //入口页
  ChangeNotifierProvider(create: (_) => LoginProvider()), //登录
];

///分类模块
List<SingleChildWidget> category = [
  ChangeNotifierProvider(create: (_) => LeftMenuProvider()), //左菜单
  ChangeNotifierProvider(create: (_) => SubCategoryProvider()), //注册子分类数据
  ChangeNotifierProvider(create: (_) => SubCategoryGoodsPageProvider()), //注册子分类商品页数据
];

///购物车模块
List<SingleChildWidget> cart = [
  ChangeNotifierProvider(create: (_) => CartProvider()), //注册购物车
];
